Protein-DNA recognition is a central biological process that governs the life of cells. A protein will often undergo a conformational transition to form the functional complex with its target DNA. The protein conformational dynamics are expected to contribute to the stability and specificity of DNA recognition and therefore may control the functional activity of the protein-DNA complex. Understanding how the conformational dynamics influences the protein-DNA recognition is still challenging. Here, we developed a two-basin structure-based model to explore functional dynamics in Sulfolobus solfataricus DNA Y-family polymerase IV (DPO4) during its binding to DNA. With explicit consideration of non-specific and specific interactions between DPO4 and DNA, we found that DPO4-DNA recognition is comprised of first 3D diffusion, then a short-range adjustment sliding on DNA and finally specific binding. Interestingly, we found that DPO4 is under a conformational equilibrium between multiple states during the binding process and the distributions of the conformations vary at different binding stages. By modulating the strength of the electrostatic interactions, the flexibility of the linker, and the conformational dynamics in DPO4, we drew a clear picture on how DPO4 dynamically regulates the DNA recognition. We argue that the unique features of flexibility and conformational dynamics in DPO4-DNA recognition have direct implications for low-fidelity translesion DNA synthesis, most of which is found to be accomplished by the Y-family DNA polymerases. Our results help complete the description of the DNA synthesis process for the Y-family polymerases. Furthermore, the methods developed here can be widely applied for future investigations on how various proteins recognize and bind specific DNA substrates.